home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / laptop-mode-tools / modules / laptop-mode < prev    next >
Encoding:
Text File  |  2012-05-20  |  15.9 KB  |  455 lines

  1. #! /bin/sh
  2. #
  3. # Laptop mode tools module: core laptop mode functionality
  4. #
  5.  
  6. # Remove an option (the first parameter) of the form option=<number> from
  7. # a mount options string (the rest of the parameters).
  8. remove_numeric_mount_option () {
  9.     OPT="$1"
  10.     shift
  11.     echo ",$*," | sed        \
  12.      -e 's|,'"$OPT"'=[0-9]*,|,|g'    \
  13.      -e 's/,,*/,/g'            \
  14.      -e 's/^,//'            \
  15.      -e 's/,$//'
  16. }
  17.  
  18. # Remove an option (the first parameter) without any arguments from
  19. # a mount option string (the rest of the parameters).
  20. remove_fixed_mount_option () {
  21.     OPT="$1"
  22.     shift
  23.     echo ",$*," | sed        \
  24.      -e 's|,'"$OPT"',|,|g'        \
  25.      -e 's/,,*/,/g'            \
  26.      -e 's/^,//'            \
  27.      -e 's/,$//'
  28. }
  29.  
  30. # Find out the state of an atime option ("atime"/"noatime"/"relatime"/"norelatime")
  31. # in a set of mount options, and use this state to replace the value of the
  32. # option in another mount options string.
  33. #
  34. # Example:
  35. # replace_atime_mount_option defaults,user=1000,atime defaults,noatime
  36. #
  37. # This yields "defaults,atime".
  38. replace_atime_mount_option () {
  39.     REPLACEMENT_OPTS="$1"
  40.     OPTS="$2"
  41.     PARSEDOPTS="$(remove_fixed_mount_option atime $OPTS)"
  42.     PARSEDOPTS="$(remove_fixed_mount_option noatime $PARSEDOPTS)"
  43.     PARSEDOPTS="$(remove_fixed_mount_option relatime $PARSEDOPTS)"    
  44.     PARSEDOPTS="$(remove_fixed_mount_option norelatime $PARSEDOPTS)"    
  45.  
  46.     case ",$REPLACEMENT_OPTS," in
  47.     *",relatime,"*)
  48.         echo "$PARSEDOPTS,relatime"
  49.         ;;
  50.     *",noatime,"*)
  51.         echo "$PARSEDOPTS,noatime"
  52.         ;;
  53.     *)
  54.         # Kind of strange: to go from relatime to atime, we have to
  55.         # explicitly specify norelatime.
  56.          echo "$PARSEDOPTS,atime,norelatime"
  57.          ;;
  58.     esac
  59. }
  60.  
  61. # Find out the state of a numbered option (e.g. "commit=NNN") in
  62. # a set of options, and use this state to replace the
  63. # value of the option in another mount options string. 
  64. #
  65. # Example:
  66. # replace_numeric_mount_option commit defaults,user=1000,commit=3 defaults,commit=7
  67. #
  68. # This example yields "defaults,commit=3".
  69. replace_numeric_mount_option () {
  70.     OPT="$1"
  71.     DEF_OPT="$2"
  72.     REPLACEMENT_OPTS="$3"
  73.     OPTS="$4"    
  74.     PARSEDOPTS="$(remove_numeric_mount_option $OPT $OPTS)"
  75.     
  76.     if echo ",$REPLACEMENT_OPTS," | grep ",$OPT=[0123456789]+," > /dev/null ; then
  77.         echo -n "$PARSEDOPTS,$OPT="
  78.         echo ",$REPLACEMENT_OPTS," | sed \
  79.          -e 's/.*,'"$OPT"'=//'    \
  80.          -e 's/,.*//'
  81.     else
  82.         # Option not present in REPLACEMENT_OPTS: use the default.
  83.         echo "$PARSEDOPTS,$DEF_OPT"
  84.     fi
  85. }
  86.  
  87. deduce_fstype () {
  88.     MP="$1"
  89.     # My root filesystem unfortunately has type "unknown" in
  90.     # /etc/mtab. If we encounter "unknown", we try to get the
  91.     # type from fstab. This still might be wrong, in which
  92.     # case the code further down will issue a big warning.
  93.     sed 's/[[:space:]]*#.*$//' /etc/fstab |
  94.     while read FSTAB_DEV FSTAB_MP FSTAB_FST FSTAB_OPTS FSTAB_DUMP FSTAB_DUMP ; do
  95.         if [ "$FSTAB_MP" = "$MP" ]; then
  96.             echo "$FSTAB_FST"
  97.             exit 0
  98.         fi
  99.     done
  100. }
  101.  
  102.  
  103. #
  104. # Set kernel setting, showing an error if this fails.
  105. #
  106. # Parameter 1: sysctl/proc path
  107. # Parameter 2: the value
  108. #
  109. set_sysctl() {
  110.     log "VERBOSE" "Executing: echo $2 > $1"
  111.     if ! echo "$2" > "$1" ; then
  112.         log "MSG" "SETTING OF KERNEL PARAMETER FAILED: echo $2 \> $1"
  113.     fi
  114. }
  115.  
  116.  
  117. if [ "$CONTROL_READAHEAD" -ne 0 ] ; then
  118.     if /sbin/blockdev --help 2>&1 | grep -Fq -- '--setfra' ; then
  119.         READAHEAD_OPTION=--setfra                    
  120.     else
  121.         READAHEAD_OPTION=--setra
  122.         if [ "$KLEVEL" = "2.4" ] ; then
  123.             log "MSG" "Warning: Running a 2.4 kernel with blockdev that does not support --setfra."
  124.             log "MSG" "File system readahead will not function properly."
  125.         fi
  126.     fi
  127. fi
  128.  
  129.  
  130.  
  131. if [ $CONTROL_NOATIME -eq 1 ] ; then
  132.     if [ "$KLEVEL" = "2.4" ] ; then
  133.         log "VERBOSE" "Relatime is not supported on 2.4 kernels. Using noatime instead" 
  134.         USE_RELATIME=0
  135.     elif [ "$KLEVEL" = "2.6" -a "$KMINOR" -lt 23 ] ; then
  136.         log "VERBOSE" "Relatime is not supported on kernels before 2.6.23. Using noatime instead."
  137.         USE_RELATIME=0
  138.     fi
  139.     if [ "$USE_RELATIME" = 1 ] ; then
  140.         NOATIME_OPT=",relatime"
  141.     else
  142.         NOATIME_OPT=",noatime"
  143.     fi
  144. fi
  145.  
  146.  
  147. # Adjust kernel settings and mount options (but only if data loss 
  148. # sensitive features are active)
  149. if [ "$ACTIVATE_WITH_POSSIBLE_DATA_LOSS" -eq 1 ] ; then
  150.     # Take MAX_LOST_WORK_SECONDS from LM_BATT_MAX_LOST_WORK_SECONDS or LM_AC_MAX_LOST_WORK_SECONDS_WITH_LM, depending on power state.
  151.     MAX_LOST_WORK_SECONDS=$LM_BATT_MAX_LOST_WORK_SECONDS
  152.     if [ $ON_AC -eq 1 ] ; then
  153.         MAX_LOST_WORK_SECONDS=$LM_AC_MAX_LOST_WORK_SECONDS
  154.     fi
  155.  
  156.     AGE=$((100*$MAX_LOST_WORK_SECONDS))
  157.     XFS_AGE=$(($XFS_HZ*$MAX_LOST_WORK_SECONDS))
  158.  
  159.     if [ -d /proc/sys/vm/pagebuf ] ; then
  160.         # (For 2.4 and early 2.6.)
  161.         # This only needs to be set, not reset -- it is only used when
  162.         # laptop mode is enabled.
  163.         log "VERBOSE" "Adjusting XFS kernel parameters for 2.4 and early 2.6 kernels."
  164.         set_sysctl /proc/sys/vm/pagebuf/lm_flush_age  $XFS_AGE
  165.         set_sysctl /proc/sys/fs/xfs/lm_sync_interval  $XFS_AGE
  166.     elif [ -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
  167.         # (A couple of early 2.6 laptop mode patches had these.)
  168.         # This only needs to be set, not reset -- it is only used when
  169.         # laptop mode is enabled.
  170.         log "VERBOSE" "Adjusting XFS kernel parameters for early patched 2.6 kernels."
  171.         set_sysctl /proc/sys/fs/xfs/lm_age_buffer    $XFS_AGE
  172.         set_sysctl /proc/sys/fs/xfs/lm_sync_interval $XFS_AGE
  173.     elif [ -f /proc/sys/fs/xfs/age_buffer ] ; then
  174.         # (2.6.6)
  175.         # But not for these -- they are also used in normal
  176.         # operation.
  177.         log "VERBOSE" "Adjusting XFS kernel parameters for 2.6.6 kernel."
  178.         set_sysctl /proc/sys/fs/xfs/age_buffer       $XFS_AGE 
  179.         set_sysctl /proc/sys/fs/xfs/sync_interval    $XFS_AGE
  180.     elif [ -f /proc/sys/fs/xfs/age_buffer_centisecs ] ; then
  181.         # (2.6.7 upwards)
  182.         # And not for these either. These are in centisecs,
  183.         # not USER_HZ, so we have to use $AGE, not $XFS_AGE.
  184.         log "VERBOSE" "Adjusting XFS kernel parameters for >2.6.7 kernel."
  185.         set_sysctl /proc/sys/fs/xfs/age_buffer_centisecs  $AGE
  186.         set_sysctl /proc/sys/fs/xfs/xfssyncd_centisecs    $AGE
  187.         set_sysctl /proc/sys/fs/xfs/xfsbufd_centisecs     3000
  188.     fi
  189.  
  190.     if [ -f /proc/sys/vm/bdflush ]; then
  191.         log "VERBOSE" "Adjusting 2.4 kernel parameters to enable laptop mode."
  192.         set_sysctl /proc/sys/vm/laptop_mode   1
  193.         set_sysctl /proc/sys/vm/bdflush       "30 500 0 0 $AGE $AGE 60 20 0"
  194.     else
  195.         log "VERBOSE" "Adjusting 2.6+ kernel parameters to enable laptop mode."
  196.         set_sysctl /proc/sys/vm/laptop_mode          "$LM_SECONDS_BEFORE_SYNC"
  197.         set_sysctl /proc/sys/vm/dirty_writeback_centisecs "$AGE"
  198.         set_sysctl /proc/sys/vm/dirty_expire_centisecs    "$AGE"
  199.         set_sysctl /proc/sys/vm/dirty_ratio          "$LM_DIRTY_RATIO"
  200.         set_sysctl /proc/sys/vm/dirty_background_ratio    "$LM_DIRTY_BACKGROUND_RATIO"
  201.     fi
  202.     if [ $CONTROL_MOUNT_OPTIONS -eq 1 ]; then
  203.         log "VERBOSE" "Remounting filesystems."
  204.         # The -r flag makes 'read' preserve backslashes read from
  205.         # mtab. Spaces are represented by \040 in mtab. (also UTF-8)
  206.         cat /etc/mtab | while read -r DEV MP FST OPTS DUMP PASS ; do
  207.             # Now expand the escapes, inside quotes to preserve the spaces :)
  208.             MP="$(echo $MP)"
  209.             case "$FST" in 
  210.                 rootfs|unionfs|tmpfs|squashfs|sysfs|usbfs|proc|devpts)
  211.                       continue
  212.                     ;;
  213.             esac
  214.                     
  215.             DO=0
  216.             
  217.             case " $PARTITIONS " in
  218.                 *" $DEV "*)
  219.                     DO=1
  220.                     log "VERBOSE" "$DEV found in PARTITIONS."
  221.                     ;;
  222.                 *)
  223.                     log "VERBOSE" "$DEV not found in PARTITIONS."
  224.                     ;;
  225.             esac
  226.             case " $PARTITIONS " in
  227.                 *" $MP "*)
  228.                     DO=1
  229.                     log "VERBOSE" "$MP found in PARTITIONS."
  230.                     ;;
  231.                 *)
  232.                     log "VERBOSE" "$MP not found in PARTITIONS."
  233.             esac
  234.             case " $PARTITIONS " in
  235.                 *" auto "*)
  236.  
  237.                     # If we have a device referenced by a persistent device naming scheme, it does
  238.                     # not get covered in the previous heuristics. So, if we reach here, we would
  239.                     # want to do a check for it too.
  240.                     
  241.                     log "VERBOSE" "Checking $DEV against HD because PARTITIONS contains \"auto\"."
  242.                     log "VERBOSE" "$DEV\n"
  243.                     case $DEV in *"/dev/disk/by-"*)
  244.                         log "VERBOSE" "$DEV has a persistent device naming. Extracting real name\n"
  245.                         REAL_DEV=`readlink -f $DEV`
  246.                         ;;
  247.                     esac
  248.  
  249.                     for THISHD in $HD ; do
  250.                         log "VERBOSE" "   Considering $THISHD."
  251.                         case " $DEV" in *"$THISHD"*)
  252.                             DO=1
  253.                             log "VERBOSE" "   $DEV contains $THISHD, which is in HD, so we will remount it."
  254.                             break
  255.                             ;;
  256.                         esac
  257.                         
  258.                         log "VERBOSE" "Considering the persistent device names\n"
  259.                         case " $REAL_DEV" in *"$THISHD"*)
  260.                             DO=1
  261.                             log "VERBOSE" "   $REALDEV contains $THISHD, which is in HD, so we will remount it."
  262.                             log "VERBOSE" "Chaning dev to real_dev\n"
  263.                             DEV=$REAL_DEV
  264.                             break
  265.                             ;;
  266.                         esac
  267.                     done
  268.                     ;;
  269.             esac
  270.             if [ "$DO" -ne 0 ] ; then
  271.                 log "VERBOSE" "Original options: $OPTS"
  272.                 if [ "$WAS_ACTIVE" -eq 0 ] ; then
  273.                     # Coming from inactive state: save last known mount options for the device.
  274.                     log "VERBOSE" "Updating /var/run/laptop-mode-tools/nolm-mountopts." 
  275.                     if [ -f /var/run/laptop-mode-tools/nolm-mountopts ] ; then 
  276.                         sed -i "s|^$DEV .*$||" /var/run/laptop-mode-tools/nolm-mountopts
  277.                     fi
  278.                     echo $DEV $OPTS >> /var/run/laptop-mode-tools/nolm-mountopts
  279.                 else
  280.                     log "VERBOSE" "Not updating /var/run/laptop-mode-tools/nolm-mountopts because laptop mode was already active."
  281.                 fi
  282.                 if [ "$FST" = 'unknown' ]; then
  283.                     log "VERBOSE" "Deducing fstype for $MP."
  284.                     FST=$(deduce_fstype $MP)
  285.                     log "VERBOSE" "Deduced fstype for $MP as $FST."
  286.                 fi
  287.                 # Strip stuff like ext3,ext2 into just ext3.
  288.                 log "VERBOSE" "Reducing file system type." 
  289.                 FST=${FST%%,*}
  290.                 case "$FST" in
  291.                     "ext3"|"reiserfs"|"ext4dev"|"ext4")
  292.                         log "VERBOSE" "Removing commit mount option from original options." 
  293.                         PARSEDOPTS="$(remove_numeric_mount_option commit "$OPTS")"
  294.                         log "VERBOSE" "Executing: mount $DEV $MP -t $FST -o remount,$PARSEDOPTS,commit=$MAX_LOST_WORK_SECONDS$NOATIME_OPT"
  295.                         if (! mount $DEV "$MP" -t $FST -o remount,$PARSEDOPTS,commit=$MAX_LOST_WORK_SECONDS$NOATIME_OPT) ; then
  296.                             if [ "$FST" = "ext3" -a "$MP" = "/" ] ; then
  297.                                 echo "BIG FAT WARNING: Your root filesystem mounted as ext3 seems to lack support for"
  298.                                 echo "the commit mount option. This usually means that your root filesystem is"
  299.                                 echo "mounted as ext2 because there is no ext3 support in the kernel at boot time,"
  300.                                 echo "usually because you compiled ext3 as a module and don't load it in an initrd."
  301.                                 echo "Note that on recent 2.6 kernels, /proc/mounts shows the correct fs type for"
  302.                                 echo "the device /dev/root. You can check your actual root filesystem mount type"
  303.                                 echo "there. To fix the problem, either make ext3 available at boot time by compiling"
  304.                                 echo "it statically into the kernel, or configure the correct filesystem type in"
  305.                                 echo "/etc/fstab."
  306.                             fi
  307.                         fi
  308.                         ;;
  309.                     *)
  310.                         log "VERBOSE" "Executing: mount $DEV $MP -t $FST -o remount,$OPTS$NOATIME_OPT"
  311.                         mount $DEV "$MP" -t $FST -o remount,$OPTS$NOATIME_OPT
  312.                         ;;
  313.                 esac
  314.                 if [ -b $DEV -a "$CONTROL_READAHEAD" -ne 0 ] ; then
  315.                     log "VERBOSE" "Executing: /sbin/blockdev $READAHEAD_OPTION $(($LM_READAHEAD * 2)) $DEV"
  316.                     log "VERBOSE" "`/sbin/blockdev $READAHEAD_OPTION $(($LM_READAHEAD * 2)) $DEV 2>&1`"
  317.                 fi
  318.             fi
  319.         done
  320.     fi
  321. else
  322.     # DEACTIVATE w.r.t. kernel options and mount point settings
  323.     U_AGE=$((100*$DEF_UPDATE))
  324.     B_AGE=$((100*$DEF_MAX_AGE))
  325.     set_sysctl /proc/sys/vm/laptop_mode 0
  326.     if [ -f /proc/sys/fs/xfs/age_buffer -a ! -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
  327.         # These need to be restored, if there are no lm_*.
  328.         log "VERBOSE" "Restoring default XFS settings (pre-centisecs version)."
  329.         set_sysctl /proc/sys/fs/xfs/age_buffer    $(($XFS_HZ*$DEF_XFS_AGE_BUFFER))
  330.         set_sysctl /proc/sys/fs/xfs/sync_interval $(($XFS_HZ*$DEF_XFS_SYNC_INTERVAL))
  331.     elif [ -f /proc/sys/fs/xfs/age_buffer_centisecs ] ; then
  332.         # These need to be restored as well.
  333.         log "VERBOSE" "Restoring default XFS settings."
  334.         set_sysctl /proc/sys/fs/xfs/age_buffer_centisecs  $((100*$DEF_XFS_AGE_BUFFER))
  335.         set_sysctl /proc/sys/fs/xfs/xfssyncd_centisecs    $((100*$DEF_XFS_SYNC_INTERVAL))
  336.         set_sysctl /proc/sys/fs/xfs/xfsbufd_centisecs     $((100*$DEF_XFS_BUFD_INTERVAL))
  337.     fi
  338.     if [ -f /proc/sys/vm/bdflush ]; then
  339.         log "VERBOSE" "Adjusting 2.4 kernel parameters to disable laptop mode."
  340.         set_sysctl /proc/sys/vm/bdflush "30 500 0 0 $U_AGE $B_AGE 60 20 0"
  341.     else
  342.         log "VERBOSE" "Adjusting 2.6+ kernel parameters to disable laptop mode."
  343.         set_sysctl /proc/sys/vm/dirty_writeback_centisecs   "$U_AGE"
  344.         set_sysctl /proc/sys/vm/dirty_expire_centisecs      "$B_AGE"
  345.         set_sysctl /proc/sys/vm/dirty_ratio            "$NOLM_DIRTY_RATIO"
  346.         set_sysctl /proc/sys/vm/dirty_background_ratio        "$NOLM_DIRTY_BACKGROUND_RATIO"
  347.     fi
  348.     if [ $CONTROL_MOUNT_OPTIONS -eq 1 ] ; then
  349.         log "VERBOSE" "Remounting filesystems."
  350.         # The -r flag makes 'read' preserve backslashes read from
  351.         # mtab. Spaces are represented by \040 in mtab. (also UTF-8)
  352.         cat /etc/mtab | while read -r DEV MP FST OPTS DUMP PASS ; do
  353.             # Now expand the escapes, inside quotes to preserve the spaces :)
  354.             MP="$(echo $MP)"
  355.             DO=0
  356.             case " $PARTITIONS " in
  357.                 *" $DEV "*)
  358.                     DO=1
  359.                     log "VERBOSE" "$DEV found in PARTITIONS."
  360.                     ;;
  361.                 *)
  362.                     log "VERBOSE" "$DEV not found in PARTITIONS."
  363.                     ;;
  364.             esac
  365.             case " $PARTITIONS " in
  366.                 *" $MP "*)
  367.                     DO=1
  368.                     log "VERBOSE" "$MP found in PARTITIONS."
  369.                     ;;
  370.                 *)
  371.                     log "VERBOSE" "$MP not found in PARTITIONS."
  372.                     ;;
  373.             esac
  374.             case " $PARTITIONS " in
  375.                 *" auto "*)
  376.                     # If we have a device referenced by a persistent device naming scheme, it does
  377.                     # not get covered in the previous heuristics. So, if we reach here, we would
  378.                     # want to do a check for it too.
  379.                     
  380.                     log "VERBOSE" "Checking $DEV against HD because PARTITIONS contains \"auto\"."
  381.                     case " $DEV" in *"/dev/disk/by-"*)
  382.                         log "VERBOSE" "$DEV has a persistent device naming. Extracting real name\n"
  383.                         REAL_DEV=`readlink -f $DEV`
  384.                         ;;
  385.                     esac
  386.  
  387.                     log "VERBOSE" "Checking $DEV against HD because PARTITIONS contains \"auto\"."
  388.                     for THISHD in $HD ; do
  389.                         log "VERBOSE" "   Considering $THISHD."
  390.                         case " $DEV" in *"$THISHD"*)
  391.                             DO=1
  392.                             log "VERBOSE" "   $DEV contains $THISHD, which is in HD, so we will remount it."
  393.                             break
  394.                             ;;
  395.                         esac
  396.  
  397.                         log "VERBOSE" "Considering the persistent device names\n"
  398.                         case " $REAL_DEV" in *"$THISHD"*)
  399.                             DO=1
  400.                             log "VERBOSE" "   $REALDEV contains $THISHD, which is in HD, so we will remount it."
  401.                             log "VERBOSE" "Chaning dev to real_dev\n"
  402.                             DEV=$REAL_DEV
  403.                             break
  404.                             ;;
  405.                         esac
  406.                     done
  407.                     ;;
  408.             esac
  409.             if [ "$DO" -ne 0 ] ; then
  410.                 # Reset commit and atime options to defaults.
  411.                 log "VERBOSE" "Original options: $OPTS"
  412.                 if [ "$FST" = 'unknown' ]; then
  413.                     log "VERBOSE" "Deducing fstype for $MP."
  414.                     FST=$(deduce_fstype $MP)
  415.                     log "VERBOSE" "Deduced fstype for $MP as $FST."
  416.                 fi
  417.                 
  418.                 # Strip stuff like ext3,ext2 into just ext3.
  419.                 log "VERBOSE" "Reducing file system type."
  420.                 FST=${FST%%,*}
  421.                 
  422.                 # Retrieve original non-laptop mode mount options and restore them.
  423.                 # If the file that stores them doesn't exist, then laptop mode
  424.                 # has never been started.
  425.                 if [ "$WAS_ACTIVE" -ne 0 -a -f /var/run/laptop-mode-tools/nolm-mountopts ] ; then                        
  426.                     SAVED_OPTS=`grep "^$DEV " /var/run/laptop-mode-tools/nolm-mountopts`
  427.                     SAVED_OPTS=${SAVED_OPTS#* } # trim device name
  428.                 
  429.                     case "$FST" in
  430.                         "ext3"|"reiserfs"|"ext4dev"|"ext4")                                
  431.                             PARSEDOPTS="$(replace_numeric_mount_option commit commit=0 $SAVED_OPTS $OPTS)"
  432.                             PARSEDOPTS="$(replace_atime_mount_option $SAVED_OPTS $PARSEDOPTS)"
  433.                             log "VERBOSE" "Executing: mount $DEV $MP -t $FST -o remount,$PARSEDOPTS"
  434.                             mount $DEV "$MP" -t $FST -o remount,$PARSEDOPTS
  435.                             ;;
  436.                         *)
  437.                             PARSEDOPTS="$(replace_atime_mount_option $SAVED_OPTS $OPTS)"
  438.                             log "VERBOSE" "Executing: mount $DEV $MP -t $FST -o remount,$PARSEDOPTS"
  439.                             mount $DEV "$MP" -t $FST -o remount,$PARSEDOPTS
  440.                             ;;
  441.                     esac
  442.                 else
  443.                     log "VERBOSE" "No saved mount options, so apparently we never remounted this filesystem during this session."
  444.                     log "VERBOSE" "Not remounting."
  445.                 fi
  446.                 if [ -b $DEV -a "$CONTROL_READAHEAD" -ne 0 ] ; then
  447.                     log "VERBOSE" "Executing: /sbin/blockdev $READAHEAD_OPTION $(($NOLM_READAHEAD * 2)) $DEV"
  448.                     log "VERBOSE" "`/sbin/blockdev $READAHEAD_OPTION $(($NOLM_READAHEAD * 2)) $DEV 2>&1`"
  449.                 fi
  450.             fi
  451.         done
  452.     fi
  453. fi
  454.  
  455.